require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
	solidity: "0.8.28",
	networks: {
		// 本地开发网络
		localhost: {
			url: "http://127.0.0.1:8545",
		},
		// Sepolia 测试网
		sepolia: {
			url: `https://sepolia.infura.io/v3/${process.env.INFURA_KEY}`,
			accounts: [process.env.PRIVATE_KEY],
		},
		// 主网（谨慎操作！）
		mainnet: {
			url: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`,
			accounts: [process.env.PRIVATE_KEY],
		}
	},
	etherscan: {
		apiKey: process.env.ETHERSCAN_API_KEY,
	},
};